package com.example.myproject.client;

import com.smartgwt.client.widgets.grid.ListGridRecord;


class Table extends ListGridRecord {

	  public Table(int code, String condition, int orient, int x, int y) {
	    setCode(code);
	    setCondition(condition);
	    setOrient(orient);
	    setX(x);
	    setY(y);
	  }
	  
	  public Table(Module mod) {
		  this(mod.getCode(), mod.getStatus(), mod.getOrient(), mod.getX(), mod.getY());
	  }
	  
	  public Table() {
		  this(0, "", 0, 0, 0);		  
	  }
	
	  public void setCode(int code) {
	    setAttribute("Module", code);
	  }

	  public String getCode() {
	    return getAttributeAsString("code");
	  }

	  public void setCondition(String condition) {
	    setAttribute("Status", condition);
	  }

	  public String getCondition() {
	    return getAttribute("Status");
	  }

	  public void setOrient(int orient) {
		setAttribute("Orient", orient);
	  }

	  public String getOrient() {
	    return getAttributeAsString("Orient");
	  }

	  public void setX(int x) {
	    setAttribute("X", x);
	  }

	  public String getX() {
	    return getAttributeAsString("X");
	  }
	  
	  public void setY(int y) {
	    setAttribute("Y", y);
	  }

	  public String getY() {
	    return getAttributeAsString("Y");	  
	  }  
}  